﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cricket.LinqModel
{
    public partial class Result
    {
        private IDataRepository _dataObject;
        public Result(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public void Create()
        {
            _dataObject.CreateResult(this);
        }
        //public List<GetOversByTeamIdAndMatchIdResult> GetOverByTeamIdAndMatchId(int TeamId, int MatchId)
        //{
        //    return _dataObject.GetOverByTeamIdAndMatchId(TeamId, MatchId);
        //}
        public List<GetOversByTeamIdAndMatchIdResult> GetOversByTeamAndMatch(int TeamId, int MatchId)
        {
            return _dataObject.GetOversByTeamAndMatch(TeamId, MatchId);
        }
        public List<GetOversByMatchIdResult> GetOversByMatch(int MatchId)
        {
            return _dataObject.GetOversByMatch(MatchId);
        }
        public void CalculateWinningResultsForCustomers(int matchScheduleId, int bettingTypeId, int matchTypeId, int over, int TeamId)
        {
            _dataObject.CalculateWinningResultsForCustomers(matchScheduleId, bettingTypeId, matchTypeId,over,TeamId);
        }
        public void CalculateNineEleven(int matchScheduleId, int bettingTypeId, int matchTypeId, int over, int TeamId)
        {
            _dataObject.CalculateNineEleven(matchScheduleId, bettingTypeId, matchTypeId, over, TeamId);
        }
    }
}
